Inferring Fences in a Concurrent Program Using SC proof of Correctness

نویسندگان

  • Chinmay Narayan
  • Shibashis Guha
  • S. Arun-Kumar
چکیده

Most proof systems for concurrent programs [Jon83] [O’H07] [VP07] assume the underlying memory model to be sequentially consistent(SC), an assumption which does not hold for modern multicore processors. These processors, for performance reasons, implement relaxed memory models. As a result of this relaxation a program, proved correct on the SC memory model, might execute incorrectly. To ensure its correctness under relaxation, fence instructions are inserted in the code. In this paper we show that the SC proof of correctness of an algorithm, carried out in the proof system of [Sou84], identifies per-thread instruction orderings sufficient for this SC proof. Further, to correctly execute this algorithm on an underlying relaxed memory model it is sufficient to respect only these orderings by inserting fence instructions.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Tackling Real-Life Relaxed Concurrency with FSL++

We extend fenced separation logic (FSL), a program logic for reasoning about C11 relaxed access and memory fences. Our extensions to FSL allow us to handle concurrent algorithms appearing in practice. New features added to FSL allow for reasoning about concurrent nonatomic reads, atomic updates, ownership transfer via release sequences, and ghost state. As a demonstration of power of the extend...

متن کامل

The Best of Both Worlds: Trading Efficiency and Optimality in Fence Insertion for TSO

We present a method for automatic fence insertion in concurrent programs running under weak memory models that provides the best known trade-off between efficiency and optimality. On the one hand, the method can efficiently handle complex aspects of program behaviors such as unbounded buffers and large numbers of processes. On the other hand, it is able to find small sets of fences needed for e...

متن کامل

Certainty in Lockless Concurrent Algorithms: an Informal Proof of Lace

Lockless concurrent programming brings new challenges to the field of program verification. These lockless programs require methods such as compare-and-swap and memory fences to ensure correctness. However, their unpredictable behaviour in combination with these methods complicates verifying such algorithms. We use linearisation points[3], i.e. the points in time when the state of the system ch...

متن کامل

Verifying concurrent programs under weak memory models

Modern multicore processors provide weak memory models like TSO, PSO or even weaker execution semantics. These memory models – due to store bu ers – seemingly reorder program operations. Thus, they deviate from the commonly assumed sequential consistency (SC) semantics. Analysis and in particular veri cation techniques for concurrent programs consequently need to take these weak semantics into ...

متن کامل

Verifying Fence Elimination Optimisations

We consider simple compiler optimisations for removing redundant memory fences in programs running on top of the x86-TSO relaxed memory model. While the optimisations are performed using standard thread-local control flow analyses, their correctness is subtle and relies on a non-standard global simulation argument. The implementation and the proof of correctness are programmed in Coq as part of...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • CoRR

دوره abs/1304.2936  شماره 

صفحات  -

تاریخ انتشار 2013